package com.qingtian.example.web.dao;

import com.qingtian.example.web.entity.People;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author qingtian
 * @Description
 * @Date Created in 2018/3/15
 */
public interface PeopleDao {

    /**
     * 返回people全部数据（分页）
     * @param offset
     * @param limit
     * @return
     */
    List<People> listAll(@Param("offset") int offset, @Param("limit") int limit );

    /**
     * 查找
     * @param id
     * @return
     */
    People getPeople(long id);

    /**
     * 插入一条数据
     * @param people
     * @return
     */
    long insertPeople(People people);

    /**
     * 更新一条数据
     * @param people
     * @return
     */
    long updatePeople(People people);

    /**
     * 删除一条数据
     * @param id
     * @return
     */
    long deletePeople(long id);
}
